//
// Created by mac on 2020/10/23.
//

#ifndef CLAS_SLEEP_H
#define CLAS_SLEEP_H

#endif //CLAS_SLEEP_H
#include <sys/select.h>



static void sleep_ms(unsigned int secs)

{
    struct timeval tval;

    tval.tv_sec=secs/1000;

    tval.tv_usec=(secs*1000)%1000000;

    select(0,NULL,NULL,NULL,&tval);

}